import WxValidate from "./WxValidate";
import {
  WxValidateInstance,
  WxValidateMessagesInfo,
  WxValidateRulesInfo,
} from "./WxValidate.type";

export function buildWxValidateInstance(
  rulesInfo: WxValidateRulesInfo,
  messagesInfo: WxValidateMessagesInfo
) {
  const wxValidate = new WxValidate(
    rulesInfo,
    messagesInfo
  ) as unknown as WxValidateInstance;
  return wxValidate;
}
